

package cuttings;

import java.io.*;
import java.net.*;

public class KeyboardTracker implements Runnable
{
    BufferedReader inFromUser;

    public KeyboardTracker(BufferedReader inputStream)
    {
        inFromUser = inputStream;
    }

    public void run()
    {
	try {
	    trackkeyboard();
	} catch (Exception e) {
	    System.out.println(e);
	}
    }

    public void trackkeyboard() throws Exception
    {
        while(true)
        {
            String sentence = inFromUser.readLine();
            SendSocketsList.sendToAll(sentence);
        }
    }
}
